#!python
# coding=utf-8
'''
FilePath     : /code/src/eval_utils/cli.py
Description  :  
Author       : desyang
Date         : 2025-09-25 15:44:39
LastEditors  : desyang
LastEditTime : 2025-09-26 16:09:45
'''
import argparse

from eval_utils.eval import calculate_psnr_ssim

def parse_args():
    parser = argparse.ArgumentParser(description="Calculate PSNR and SSIM")
    parser.add_argument("--dir1", type=str, required=True, help="Path to the first image directory")
    parser.add_argument("--dir2", type=str, required=True, help="Path to the second image directory")
    parser.add_argument("--core", "-c", type=int, default=None, help="Number of workers for multiprocessing")

    return parser.parse_args()

def main():
    args = parse_args()
    psnr, ssim = calculate_psnr_ssim(args.dir1, args.dir2, args.core)
    print(f'PSNR: {psnr:.2f}, SSIM: {ssim:.4f}')


if __name__ == "__main__":
    main()